<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        #div0{
            width: 100%;
        }
        #div0 div{
            float: left;
            height: 100px;
        }
        #div0 div:nth-child(1){
            background-color: red;
        }
        #div0 div:nth-child(2){
            background-color: blue;
        }
        #div0 div:nth-child(3){
            background-color: green;
        }
    </style>
    <style media="(min-device-width: 400px)">
        #div0 div{
            width: 33.3%;
        }
    </style>
    <style media="(min-device-width: 300px) and (max-device-width: 399px)">
        #div0 div{
            width: 50%;
        }
    </style>
    <style media="(max-device-width: 299px)">
        #div0 div{
            width: 100%;
        }
    </style>
</head>
<body>
<div id="div0">
    <div></div>
    <div></div>
    <div></div>
</div>
</body>
</html>
